import request from "@/utils/request";

// 示例API函数
export function getCompetitionList(params) {
  return request({
    url: "/competitions",
    method: "get",
    params,
  });
}

export function getCompetitionDetail(id) {
  return request({
    url: `/competitions/${id}`,
    method: "get",
  });
}

export function submitResult(data) {
  return request({
    url: "/submissions",
    method: "post",
    data,
  });
}

export function getUserRanking(competitionId, params) {
  return request({
    url: `/competitions/${competitionId}/ranking`,
    method: "get",
    params,
  });
}
